package com.example.drone.controller;

import com.example.drone.dao.UserMapper;
import com.example.drone.entity.User;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
public class UserController {
    @Resource
    private UserMapper userMapper;


    @RequestMapping("/userinfo")
    public List<User> userInfo(){
        List<User> list = userMapper.selectList(null);
//        return list.toString();
        return list;
    }
}
